//
//  Macro.h
//  QVBusConductor
//
//  Created by Ting Han on 2017/9/1.
//  Copyright © 2017年 Ting Han. All rights reserved.
//

#ifndef Macro_h
#define Macro_h

//屏幕尺寸
#define kHTScreenWidth [UIScreen mainScreen].bounds.size.width
#define kHTScreenHeight [UIScreen mainScreen].bounds.size.height
#define kHTNavicationBarHeigth 44.0
#define kHTStatusBarHeight 20.0
#define kHTToolBarHeight 49.0
#define kHTNavicationBarAndStatusBar 64.0
#define kApplicationStatusBarHeight  [UIApplication sharedApplication].statusBarFrame.size.height //状态栏的高度
#define IS_IPHONE_X     (kHTScreenWidth == 375.f && kHTScreenHeight == 812.f)
#define IPHONE_NAVIGATIONBAR_HEIGHT  (IS_IPHONE_X ? 88 : 64)
#define IPHONE_STATUSBAR_HEIGHT      (IS_IPHONE_X ? 44 : 20)
#define IPHONE_SAFEBOTTOMAREA_HEIGHT (IS_IPHONE_X ? 34 : 0)
#define IPHONE_TOPSENSOR_HEIGHT      (IS_IPHONE_X ? 32 : 0)
//屏幕适配，比例适配,以7为基准
#define kHTWidthScale [UIScreen mainScreen].bounds.size.width/375.0
#define kHTHeightScale [UIScreen mainScreen].bounds.size.height/667.0
#define kHeight(y) kHTHeightScale*y
#define kWidth(x) kHTWidthScale*x

//color
#define HTColorFromRGB(rgbValue)  [UIColor colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 green:((float)((rgbValue & 0xFF00) >> 8))/255.0  blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define HTColorRGB(r,g,b)  [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:1.0]
#define HTColorRGBA(r,g,b,a)  [UIColor colorWithRed:(r)/255.0 green:(g)/255.0 blue:(b)/255.0 alpha:(a)]
//项目
//颜色
#define  kNaviBarColor  HTColorRGB(42,176,116)
#define kBackgroundColor [UIColor groupTableViewBackgroundColor]
#define kMainColor [UIColor blueColor]
#define kMainGrayColor [UIColor lightGrayColor]
#define kBlueColor HTColorFromRGB(0x4e9ffa)
#define kRedColor HTColorFromRGB(0xdd4c39)
#define kPurpleColor  HTColorFromRGB(0x8c86e6)
#define kGreenColor  HTColorFromRGB(0x69dca5)



//大小
#define kFooterHeight kWidth(60)

//debug log
#ifdef DEBUG
#define DBLog(...) NSLog(@"%s(第%d行) %@", __PRETTY_FUNCTION__, __LINE__, [NSString stringWithFormat:__VA_ARGS__])
#else
#define DBLog(...)
#endif


//版本控制
#define Is_up_Ios_9        ([[UIDevice currentDevice].systemVersion floatValue] >= 9.0）

#define kAmapKey @"645d22fd4835cc3676d467a8a8424153"
#define kUmeKey @"59c8d92af29d981cab0001c0"

//网络请求
//#define BaseURL @"http://192.168.1.128/freight/public/api/v1/"
#define BaseURL @"http://hy.qvbus.com/api/v1/"

//Version driver/getdriverversion
#define requestDriverversion [NSString stringWithFormat:@"%@driver/getdriverversion",BaseURL]
//验证码 driver/getmessage?phone=13126821937
#define requestSecurityCode  [NSString stringWithFormat:@"%@driver/getmessage",BaseURL]
//登陆 driver/driverlogin?phone=13126821937&yzm=5500
#define requestlogin [NSString stringWithFormat:@"%@driver/driverlogin",BaseURL]

//添加订阅线路
#define requestCreatlines [NSString stringWithFormat:@"%@booksline/createlines",BaseURL]
//删除订阅线路
#define requestDeletelines [NSString stringWithFormat:@"%@booksline/deleteline",BaseURL]
//获取订阅线路列表
#define requestLinesList  [NSString stringWithFormat:@"%@booksline/getbooklist",BaseURL]


//货源搜索
#define requestGoodsSearch [NSString stringWithFormat:@"%@orders/getorders",BaseURL]
//货源详情
#define requestGoodsDetial [NSString stringWithFormat:@"%@orders/getorderinfor",BaseURL]

//司机接单
#define requestChargeOrders [NSString stringWithFormat:@"%@orders/changerorders",BaseURL]
//货主资料
#define requestCargosInfor  [NSString stringWithFormat:@"%@orders/getcargosinfors",BaseURL]

//注册
//获取副驾 driver/getuser
#define requestCopilots  [NSString stringWithFormat:@"%@driver/getuser",BaseURL]
//解除副驾 driver/driverstate
#define requestUnbindCopilots  [NSString stringWithFormat:@"%@driver/driverstate",BaseURL]
//绑定副驾
#define requestBindCopilots  [NSString stringWithFormat:@"%@user/invite",BaseURL]
//副驾拒绝主驾邀请  
#define requestCopilotRejectApply [NSString stringWithFormat:@"%@user/refushdrivers",BaseURL]
//撤销邀请
#define requestCopilotReturnApply [NSString stringWithFormat:@"%@user/returndriver",BaseURL]
//接收申请
#define requestCopilotApply [NSString stringWithFormat:@"%@user/codrivers",BaseURL]


//变更车辆
#define requestChangerCar  [NSString stringWithFormat:@"%@driver/changercar",BaseURL]
//获取用户头像信息
#define requestUserspic  [NSString stringWithFormat:@"%@driver/getuserspic",BaseURL]

//上传图片
#define requestUploadUserspic  [NSString stringWithFormat:@"%@driver/updatepic",BaseURL]
//注册 driver/regist
#define requestRegist  [NSString stringWithFormat:@"%@driver/regist",BaseURL]


//运单
#define requestMyWaybills  [NSString stringWithFormat:@"%@orders/getmyorders",BaseURL]
//运单详情
#define requestMyWaybillDetial  [NSString stringWithFormat:@"%@orders/getmyorderinfor",BaseURL]
//评价订单
#define requestCreateComment  [NSString stringWithFormat:@"%@orders/createcontent",BaseURL]
//浏览记录
#define requestRecord [NSString stringWithFormat:@"%@orders/gethistory",BaseURL]
//注册友盟
#define requestNotificationRegister  [NSString stringWithFormat:@"%@driver/regitymeng",BaseURL]
//我的信息
#define requestUserMessage  [NSString stringWithFormat:@"%@user/getmessage",BaseURL]
//上传地理信息
#define requestPostAddress  [NSString stringWithFormat:@"%@user/updatelat",BaseURL]


#endif /* Macro_h */
